package constant

import "pay/api/pay"

// NSQ topic
const (
	/* 生产 */
	TopicPayFinish    = "pay-order_pay_finish"    // 发送支付成功消息
	TopicRefundFinish = "pay-order_refund_finish" // 发送退款完毕消息
	/* 消费 */
	TopicWechatApply       = "wxpay-apply_notify"  // 微信进件消息
	TopicWxpayPayNotify    = "wxpay-trade_payed"   // 电商收付通支付通知
	TopicWxpayRefundNotify = "wxpay-refund_notify" // 电商收付通退款通知
	// TopicAlipayApply  = ""
	/* 自产自销 */
	TopicInnerOrder = "pay-inner_order" // 商城内部订单定时任务
)

// NSQ status
const (
	NSQInit    = 0 // 消息初始化
	NSQSucceed = 1 // 消息发送成功
	//NSQMarked  = 2 // 消息标记成功
)

// 支付方式名称
var PayNameMap = map[pay.PayType]string{
	pay.PayType_PAY_ALIPAY:    "支付宝",
	pay.PayType_PAY_WECHAT:    "微信",
	pay.PayType_PAY_BYTEDANCE: "抖音",
	pay.PayType_PAY_MEMBER:    "余额",
}

// 标准指针状态
const (
	StatusTrue = true
)

var EmptyBytes = []byte("{}")

// 支付宝失败错误码
var AlipayFailedCodes = []string{
	"ACQ.ACCESS_FORBIDDEN",
	"ACQ.EXIST_FORBIDDEN_WORD",
	"ACQ.PARTNER_ERROR",
	"ACQ.TOTAL_FEE_EXCEED",
	"ACQ.PAYMENT_AUTH_CODE_INVALID",
	"ACQ.CONTEXT_INCONSISTENT",
	"ACQ.TRADE_HAS_CLOSE",
	"ACQ.TRADE_NOT_EXIST",
	"ACQ.BUYER_BALANCE_NOT_ENOUGH",
	"ACQ.BUYER_BANKCARD_BALANCE_NOT_ENOUGH",
	"ACQ.ERROR_BALANCE_PAYMENT_DISABLE",
	"ACQ.BUYER_SELLER_EQUAL",
	"ACQ.TRADE_BUYER_NOT_MATCH",
	"ACQ.BUYER_ENABLE_STATUS_FORBID",
	"ACQ.PULL_MOBILE_CASHIER_FAIL",
	"ACQ.MOBILE_PAYMENT_SWITCH_OFF",
	"ACQ.PAYMENT_FAIL",
	"ACQ.BUYER_PAYMENT_AMOUNT_DAY_LIMIT_ERROR",
	"ACQ.BEYOND_PAY_RESTRICTION",
	"ACQ.BEYOND_PER_RECEIPT_RESTRICTION",
	"ACQ.BUYER_PAYMENT_AMOUNT_MONTH_LIMIT_ERROR",
	"ACQ.SELLER_BEEN_BLOCKED",
	"ACQ.ERROR_BUYER_CERTIFY_LEVEL_LIMIT",
	"ACQ.PAYMENT_REQUEST_HAS_RISK",
	"ACQ.NO_PAYMENT_INSTRUMENTS_AVAILABLE",
	"ACQ.USER_FACE_PAYMENT_SWITCH_OFF",
	"aop.app-auth-token-time-out",
	"aop.no-product-reg-by-partner",
	"aop.invalid-app-auth-token",
	"ACQ.BUYER_NOT_EXIST",
	"ACQ.INVALID_STORE_ID",
	"ACQ.NOT_SUPPORT_PAYMENT_INST",
	"ACQ.PRODUCT_AMOUNT_LIMIT_ERROR",
	"ACQ.INVALID_RECEIVE_ACCOUNT",
	"ACQ.TICKET_INFO_SYSTEM_ERROR",
}

// 审核邮件头
var ReviewHeaders = []string{"品牌", "别名", "微信子商户号", "小程序", "操作"}
